/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package components;

import Enums.ProjectType;
import components.shapemenu.ShapeMenu;
import java.awt.Color;
import java.awt.Dimension;
import java.io.Serializable;
import javax.swing.JPanel;

/**
 *
 * @author icdev
 */
public class JWorkArea extends JPanel implements Serializable {

    protected ShapeTipText bTipText;
    protected ShapeMenu bMenu;
    protected ShapeMarkerMasure shapeMasure;

    public ShapeMenu getShapeMenu() {
        return bMenu;
    }

    public void setShapeMenu(ShapeMenu mnu) {
        bMenu = mnu;
    }

    public ShapeTipText getTipText() {
        return bTipText;
    }

    public ShapeMarkerMasure getShapeMasure() {
        return shapeMasure;
    }

    public JWorkArea(String imageType) {
        super();
        this.setLayout(null);
        this.setSize(1200, 1200);
        if (imageType.equals("PCR") || imageType.equals("MRNA")) {
            this.setBackground(new Color(90, 91, 93));
        } else if (imageType.equals("PRO")) {
            this.setBackground(new Color(200, 202, 201));
        }
        bTipText = new ShapeTipText();
        bMenu = new ShapeMenu();
        bTipText.setVisible(false);
        this.add(bTipText);
        shapeMasure = new ShapeMarkerMasure();

        shapeMasure.setSize(200, 20);
        shapeMasure.setBackground(Color.red);
        this.add(shapeMasure);
        shapeMasure.setVisible(false);

    }

    @Override
    public Dimension getPreferredSize() {
        return getSize();
    }
    private String sampleType;

    public void setSampleType(String stype) {
        sampleType = stype;
    }

    public String getSampleType() {
        return sampleType;
    }
    private ProjectType projectType;

    public void setProjectType(ProjectType Type) {
        projectType = Type;
    }

    public ProjectType getProjectType() {
        return projectType;
    }
}